package com.tom.demo.controller.dashboard;

import com.tom.demo.common.response.Result;
import com.tom.demo.service.dashboard.DashboardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = {"首页"})
@RestController
@RequestMapping("/dashboard")
public class DashboardController {

    @Resource
    private DashboardService dashboardService;

    @GetMapping("/deptEcharts")
    @ApiOperation(value = "获取部门图表数据")
    public Result deptEcharts(){
        return dashboardService.deptEcharts();
    }

    @GetMapping(path = {"/getProcessDefinitions"})
    @ApiOperation(value = "获取全部以发布的流程定义")
    public Result getProcessDefinitions(){
        return dashboardService.getProcessDefinitions();
    }

}
